﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReleaseList.aspx.cs" Inherits="Hxsoft.AppV1.Admin.ArticleManage.ReleaseList" %>

<%@ Register Src="~/Controls/ListBox_FootBox.ascx" TagName="ListBox_FootBox" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ListBox_HeadBox.ascx" TagName="ListBox_HeadBox" TagPrefix="uc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>文章管理</title>

	<script type="text/javascript" src="<%# ResolveUrl("~/J/List.js") %>"></script>

	<script language="javascript" type="text/javascript">
	<!--
		function ReloadPage() {
			var btReload = document.getElementById("<%# BtReload.ClientID %>");
			if (btReload)
				btReload.click();
		}
		var oprateFile = 0;
		function OpenDialogWindow(file) {
			oprateFile = file;
			var message = "";
			if (file == 1)
				message = "是否复制选定的信息？";
			if (file == 2)
				message = "是否复制移动选定的信息？";
			var flag = window.confirm(message);
			if (flag) {
				OpenWindowCenter('ModuleList.aspx?ModuleID=<%# Request["ModuleID"] %>');
			}
		}
		function getModuleResult(result) {
			document.getElementById("hidIds").value = result;
			if (oprateFile == 1)
				document.getElementById("BtCopy").click();
			if (oprateFile == 2)
				document.getElementById("BtCopyMove").click();
		}	
	-->
	</script>

</head>
<body>
	<form id="form1" runat="server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<div id="MainBody" runat="server">
		当前位置: 管理中心 → 文章管理
		<uc:ListBox_HeadBox ID="ListBox_HeadBox1" runat="server" />
		<div class="ListBoxItem">
			<table id="ToolBarBox" cellspacing="0" width="100%">
				<tr>
					<td class="LevelCompart" align="right">
						<input type="button" class="Button" value="全选" onclick="SelectAllInner(&quot;List&quot;, &quot;&quot;);" />
						<input type="button" class="Button" value="反选" onclick="SelectReverseInner(&quot;List&quot;, &quot;&quot;);" />
						|
						<input type="submit" id="BtSetOpenCommentState" value="设置评论状态" runat="server" class="Button"
							onclick="return confirm(&quot;是否设置选定的信息的评论状态？&quot;);" onserverclick="BtSetOpenCommentState_ServerClick" />
						<input type="submit" id="BtSetArticleEffectiveState" value="设置有效状态" runat="server"
							class="Button" onclick="return confirm(&quot;是否设置选定的信息的有效状态？&quot;);" onserverclick="BtSetArticleEffectiveState_ServerClick" />
						<input type="submit" id="BtSetModuleArticleEffectiveState" value="设置发布状态" runat="server"
							class="Button" onclick="return confirm(&quot;是否设置选定的信息的发布状态？&quot;);" onserverclick="BtSetModuleArticleEffectiveState_ServerClick" />
						<input type="submit" id="BtDelete" value="删除" runat="server" class="Button" onserverclick="BtDelete_ServerClick"
							onclick="return confirm(&quot;是否删除选定的信息？&quot;);" />
						<input type="submit" id="BtRemove" value="移除" runat="server" class="Button" onclick="return confirm(&quot;是否移除选定的信息？&quot;);"
							onserverclick="BtRemove_ServerClick" />
						<input id="Button1" type="button" value="发布到" class="Button" onclick="return OpenDialogWindow(1);" />
						<input id="Button2" type="button" value="发布并移除" class="Button" onclick="return OpenDialogWindow(2);" />
						<asp:LinkButton ID="BtCopy" runat="server" OnClick="BtCopy_Click"></asp:LinkButton>
						<asp:LinkButton ID="BtCopyMove" runat="server" OnClick="BtCopyMove_Click"></asp:LinkButton>
						<%# ModuleID == null ? "" :													
								@"<input class=""Button"" onclick=""javascript:OpenWindowCenter(&quot;Release.aspx?ModuleID=" + ModuleID.Value + @"&quot;);"" type=""button"" value=""批量选择""> " +
								@"<input class=""Button"" onclick=""javascript:OpenWindowCenter(&quot;AddArticle.aspx?ModuleID=" + ModuleID.Value + @"&quot;);"" type=""button"" value=""添加"">"%>
					</td>
				</tr>
				<tr>
					<td id="Foot">
						ID:<asp:TextBox ID="TbID" runat="server"></asp:TextBox>
						关键字:<asp:TextBox ID="TbKeyword" runat="server"></asp:TextBox>
						有效:<asp:DropDownList ID="DdlArticleIsEffective" runat="server">
							<asp:ListItem Value="">-请选择-</asp:ListItem>
							<asp:ListItem Value="true">有效</asp:ListItem>
							<asp:ListItem Value="false">失效</asp:ListItem>
						</asp:DropDownList>
						发布:<asp:DropDownList ID="DdlModuleArticleIsEffective" runat="server">
							<asp:ListItem Value="">-请选择-</asp:ListItem>
							<asp:ListItem Value="true">发布</asp:ListItem>
							<asp:ListItem Value="false">屏蔽</asp:ListItem>
						</asp:DropDownList>
						<br />
						用户名:<asp:TextBox ID="TbUserName" runat="server"></asp:TextBox>
						添加时间: 从<Hxctr:JSCalendarTextBox ID="JtbStartRegisterDate" runat="server"></Hxctr:JSCalendarTextBox>
						至<Hxctr:JSCalendarTextBox ID="JtbEndRegisterDate" runat="server"></Hxctr:JSCalendarTextBox>
						<asp:Button ID="BtSearch" runat="server" Text="搜索" OnClick="BtSearch_Click" />
						|
						<asp:Button ID="BtReload" runat="server" Text="刷新" OnClick="BtReload_Click" />
					</td>
				</tr>
			</table>
		</div>
		<div class="ListBoxItem">
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
				<ContentTemplate>
					<table id="ListBox" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td class="LevelCompart">
									<asp:Repeater ID="List" runat="server" OnItemCommand="List_ItemCommand">
										<HeaderTemplate>
											<table id="List" cellspacing="1" cellpadding="2" width="100%">
												<tr id="Title">
													<th width="40">
														[ID]
													</th>
													<th>
														标题
													</th>
													<th>
														发布者
													</th>
													<th width="40">
														排序
													</th>
													<th width="120">
														发布时间
													</th>
													<th width="60">
														有效/发布
													</th>
													<th width="60">
														评论状态
													</th>
													<th width="60">
														评论管理
													</th>
													<th width="40">
														修改
													</th>
													<th width="60">
														删除/移除
													</th>
													<th class='<%# IsShowRecommendButton? "":"hideMe" %>'>
														首推
													</th>
													<th width="40">
														选择
													</th>
												</tr>
										</HeaderTemplate>
										<ItemTemplate>
											<tr class="mouseout" align="center" onmouseover="listItem_mouseOver(this);" onmouseout="listItem_mouseOut(this);">
												<td>
													<%# Eval("ArticleId") %>
												</td>
												<td align="left">
													<%# Eval("Title") %>
												</td>
												<td align="left">
													<%# Eval("CreatorName")%>
												</td>
												<td>
													<%# Eval("ArticleOrder") %>
												</td>
												<td>
													<%# Eval("ReleaseDate")%>
												</td>
												<td>
													<asp:LinkButton ID="LbtSetArticleEffectiveState" CommandName="SetArticleEffectiveState"
														OnClientClick="return confirm(&quot;是否更改该信息的有效状态？&quot;);" runat="server"><%# (bool)Eval("ArticleIsEffective") == true ? "有效" : "<span class=\"Emphasize\">失效</span>"%></asp:LinkButton>
													<asp:LinkButton ID="LbtSetModuleArticleEffectiveState" CommandName="SetModuleArticleEffectiveState"
														OnClientClick="return confirm(&quot;是否更改该信息的发布状态？&quot;);" runat="server"><%# (bool)Eval("ModuleArticleIsEffective") == true ? "发布" : "<span class=\"Emphasize\">屏蔽</span>"%></asp:LinkButton>
												</td>
												<td>
													<asp:LinkButton ID="LbtSetOpenComment" CommandName="SetOpenComment" OnClientClick="return confirm(&quot;是否更改该信息的评论状态？&quot;);"
														runat="server"><%# GetCommentState(Convert.ToInt32(Eval("ArticleId"))) %></asp:LinkButton>
												</td>
												<td>
													<a href="javascript:void(0);" onclick='javascript:OpenWindowCenter("../CommentManage/CommentList.aspx?InfoType=<%# InfoType %>&InfoID=<%# Eval("ArticleId") %>");'>
														评论管理</a>
												</td>
												<td>
													<a href="javascript:void(0);" onclick='javascript:OpenWindowCenter("ModifyArticle.aspx?&ModuleID=<%# Eval("ModuleId") %>&ArticleID=<%# Eval("ArticleId") %>");'>
														修改</a>
												</td>
												<td>
													<asp:LinkButton ID="LbtDelete" CommandName="Delete" OnClientClick="return confirm(&quot;是否删除该信息？&quot;);"
														runat="server">删除</asp:LinkButton>
													<asp:LinkButton ID="LbtRemove" CommandName="Remove" OnClientClick="return confirm(&quot;是否移除该信息？&quot;);"
														runat="server">移除</asp:LinkButton>
												</td>
												<td class='<%# IsShowRecommendButton? "":"hideMe" %>'>
													<asp:LinkButton ID="LbtSetRecommend" class='<%# IsExistRecommend? "hideMe":"" %>' CommandName="SetRecommend" OnClientClick="return confirm(&quot;是否更改该信息的推荐状态？&quot;);"
														runat="server">推荐</asp:LinkButton>
													<asp:LinkButton ID="LbtRemoveRecommend" CommandName="RemoveRecommend" class='<%# !IsExistRecommend? "hideMe":"" %>' OnClientClick="return confirm(&quot;是否更改该信息的推荐状态？&quot;);"
														runat="server"><span class="Emphasize">取消</span></asp:LinkButton>
												</td>
												<td>
													<asp:CheckBox ID="CbSelect" runat="server" />
													<asp:HiddenField ID="Identifier_ModuleID" Value='<%# Eval("ModuleId") %>' runat="server" />
													<asp:HiddenField ID="Identifier_ArticleID" Value='<%# Eval("ArticleId") %>' runat="server" />
												</td>
											</tr>
										</ItemTemplate>
										<FooterTemplate>
											</table>
										</FooterTemplate>
									</asp:Repeater>
								</td>
							</tr>
							<tr>
								<td id="Td1" align="right">
									<Hxctr:AspNetPager ID="pager" runat="server" AlwaysShow="True" OnPageChanging="pager_PageChanging"
										CustomInfoSectionWidth="" CustomInfoText="" PageSize="20" ShowCustomInfoSection="Left">
									</Hxctr:AspNetPager>
								</td>
							</tr>
						</tbody>
					</table>
				</ContentTemplate>
				<Triggers>
					<asp:AsyncPostBackTrigger ControlID="BtDelete" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtRemove" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtCopyMove" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtCopy" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtReload" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtSearch" EventName="Click" />
					<asp:AsyncPostBackTrigger ControlID="BtSetArticleEffectiveState" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtSetModuleArticleEffectiveState" EventName="ServerClick" />
					<asp:AsyncPostBackTrigger ControlID="BtSetOpenCommentState" EventName="ServerClick" />
				</Triggers>
			</asp:UpdatePanel>
		</div>
		<uc:ListBox_FootBox ID="ListBox_FootBox1" runat="server" />
	</div>
	<Hxctr:MessageBox ID="MessageBox1" runat="server" />
	<Hxctr:UpdateProgress ID="UpdateProgress1" runat="server" />
	<asp:HiddenField ID="hidIds" runat="server" />
	</form>
</body>
</html>
